package com.leslie.hhcommunity.service;

import com.leslie.hhcommunity.entity.LoginTicket;
import com.leslie.hhcommunity.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.Map;

/**
 * @author
 * @PackageName:com.leslie.hhcommunity.service
 * @ClassnName:UserService
 * @Description:
 * @Date 2021/12/31  17:32
 */
public interface UserService {

	public User findUserById(int id);

	User selectByName(String username);

	public Map<String, Object> register(User user);

	public int activation(int userId, String code);

	public Map<String, Object> login(String username, String password, int expired);

	public void logout(String ticket);

	public LoginTicket findLoginTicket(String ticket);

	public int updateHeader(int userId, String headerUrl);

	public Collection<? extends GrantedAuthority> getAuthorities(int userId);
}
